/**
* @author Jenny Windsperger, Stirling Pankow, Will Prew, Shane O'Malley-Potting
* @email jennifer.windsperger@my.uwrf.edu, stirling.pankow@my.uwrf.edu,
*        william.prew@my.uwrf.edu, shane.omalley-potting@my.uwrf.edu
* @date December 1st 2011
 */
package pongtests;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import cs343.Score;

public class Scores_Tests {
	
	static Score testScore;
	static Score testScore2;
	static Score testScore3;
	static Score testScore4;
	

	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
		testScore = new Score(5009, "DDD");
		testScore2 = new Score( 448, "FFF");
		testScore3 = new Score( 5009, "FFF");
		testScore4 = new Score( 0, "GHK");
	}

	@AfterClass
	public static void tearDownAfterClass() throws Exception {
		testScore = null;
		testScore2 = null;
		testScore3 = null;
		testScore4 = null;
	}

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public final void testCompareTo() {
		int result = testScore.compareTo(testScore2);
		assertEquals(result, 1, 0);
		result = testScore.compareTo(testScore3);
		//returns a number less than 0 but we don't know what so that
		//is why the error is so large. However, it is still testing 
		//that it is less than 0
		assertEquals(result, -2, 0);
		result = testScore.compareTo(testScore4);
		assertEquals(result, 1, 0);
		result = testScore2.compareTo(testScore);
		assertEquals(result, -1, 0);
	}
}
